package com.xdm.ui.adapter.android;

import xwt.ImplementationWrapper;
import android.content.Context;

import com.xdm.ui.XmDecoratedText;
import com.xdm.ui.XmListAdapter;

/**
 * XMListAdapter adapter for Android 
 * 
 * @author Alexander Lapygin
 */
public class AndroidListAdapter extends ImplementationWrapper implements XmListAdapter {
	public AndroidListAdapter(Context context) {
		this.setImplementation(new AndroidDecoratedTextListAdapter(context));
	}

	public void addItem(XmDecoratedText decoratedText) {
		((AndroidDecoratedTextListAdapter) implementation).addItem(decoratedText);
	}

	public boolean areAllItemsSelectable() {
		return ((AndroidDecoratedTextListAdapter) implementation).areAllItemsSelectable();
	}

	public boolean isSelectable(int position) {
		return ((AndroidDecoratedTextListAdapter) implementation).isSelectable(position);
	}
}
